import com.ridgesoft.robotics.Servo;
import com.ridgesoft.intellibrain.IntelliBrain;
import com.ridgesoft.intellibrain.IntelliBrainDigitalIO;

public class Movement {
	private static int MOTO_PORT = 1;
	private static int STEER_PORT = 2;
	private static int KILL_PORT = 3;
	private static int STOP = 50;
	private static int SHARP_LEFT = 25;
	private static int SHARP_RIGHT = 100;
	private int speed;
	
	Servo steer;
	Servo moto;
	IntelliBrainDigitalIO killMe;
	
	public Movement()
	{
		speed = 61;
		moto = IntelliBrain.getServo(MOTO_PORT);
		steer = IntelliBrain.getServo(STEER_PORT);
		killMe = IntelliBrain.getDigitalIO(KILL_PORT);
	}
	/*
	public Movement(int motoPort,int steerPort, int killPort)
	{
	}
	*/
	public void setSpeed(int value)
	{
		speed = value;
	}
	public int getSpeed()
	{
		return speed;
	}
	
	public void Left()
	{
		steer.setPosition(SHARP_LEFT);
	}

	public void Right()
	{
		steer.setPosition(SHARP_RIGHT);
	}

	public void Forward()
	{
		moto.setPosition(speed);
	}

	public void Stop()
	{
		moto.setPosition(STOP);
	}
}